export default function debounce(fn) {
    let timer: NodeJS.Timeout | null = null;
    return (...arg) => {
        if (timer) clearTimeout(timer)
        timer = setTimeout(() => {
            fn(...arg)
        }, 300)
    }
}